/**

 * @Description:TODO

 * @author:liyang

 * @time:2017年8月22日 下午1:53:37

 */
package com.thor.palmmall.impl.statement;

import org.springframework.beans.factory.annotation.Autowired;

import com.thor.commons.entity.OperateInfo;
import com.thor.commons.query.QueryResult;
import com.thor.commons.query2.QueryDefinition2;
import com.thor.palmmall.api.statement.AStatementPayBill;
import com.thor.palmmall.api.statement.StatementService;
import com.thor.palmmall.dao.statement.StatementBillDao;
import com.thor.palmmall.dao.statement.converter.StatementPayBillConverter;

/**
 * @author:liyang
 * @time:2017年8月22日 下午1:53:37
 * @since:1.0
 */
public class StatementServiceImpl implements StatementService {

  @Override
  public String saveStatementPayBill(AStatementPayBill bill, OperateInfo operateInfo) {
    return statementBillDao
        .saveStatementPayBill(StatementPayBillConverter.getInstance().convert(bill), operateInfo);
  }

  @Override
  public AStatementPayBill getByUuid(String uuid) {
    return statementBillDao.getByUuid(uuid);
  }

  @Override
  public QueryResult<AStatementPayBill> query(QueryDefinition2 definition) {
    return statementBillDao.query(definition);
  }

  @Override
  public AStatementPayBill getByBillNumber(String billNumber) {
    return statementBillDao.getByBillNumber(billNumber);
  }

  @Autowired
  private StatementBillDao statementBillDao;

}
